package com.nicolasprof.profgallery.effects {
	import gs.TweenLite;

	import com.nicolasprof.profgallery.Engine;
	import com.nicolasprof.profgallery.effects.Effect;

	import flash.display.Bitmap;

	/**
	 * @author Nicolas Prof
	 */
	public class AlphaEffect extends Effect {
		public function AlphaEffect() {
			super();
		}
		override public function build(...$layers) : void {
			var bitmap : Bitmap = $layers[0];
			var config: XML = getConfig();
			
			bitmap.visible = false;
			bitmap.alpha = 0;
			
			TweenLite.to(bitmap, config.@time, {autoAlpha:1});
		}

		override protected function getConfig() : XML {
			var config : XML = Engine.CONFIG_XML;
			return config.effects.fade[0];
		}
	}
}
